﻿#ifndef TRAINTHREAD_H
#define TRAINTHREAD_H

#include <QWidget>
#include<QThread>
#include<iostream>
#include"face.hpp"
#include<opencv2/opencv.hpp>
#include<vector>
#include<string>
using namespace std;
using namespace cv;
namespace Ui {
class TrainThread;
}

class TrainThread : public QThread
{
    Q_OBJECT

public:
    explicit TrainThread(QWidget *parent = nullptr);
    ~TrainThread();
    void SetFilepath(QString & filepath);

private:
    void run ();
    void read_csv(const string& filename, vector<Mat>& images, vector<int>& labels);
    QString filepath;
signals:
    void finished();
};

#endif // TRAINTHREAD_H
